package com.sunfeng;


import java.nio.ByteBuffer;

/**
 * @description:
 * @author: 孙 峰
 * @time: 2020/11/5 20:32
 */
public class Test1 {
    public static void main(String[] args) {
        byte[] bytes = new byte[]{1, 2, 3};
        short[] shorts = new short[]{1, 2, 3, 4};
        int[] ints = new int[]{1, 2, 3, 4, 5};
        long[] longs = new long[]{1, 2, 3, 4, 5, 6};
        float[] floats = new float[]{1, 2, 3, 4, 5, 6, 7};
        double[] doubles = new double[]{1, 2, 3, 4, 5, 6, 7, 8};
        char[] chars = new char[]{'a', 'b', 'c', 'd'};
        ByteBuffer wrap = ByteBuffer.wrap(bytes);

        System.out.println(wrap.getClass().getName());
        System.out.println(wrap.capacity());

    }
}
